import * as AntIcon from '@ant-design/icons-vue';
import Antd from 'ant-design-vue';
import { createApp } from 'vue';
import App from './App.vue';
import './assets/global.less';
import './assets/theme.less';
import components from './components/global';
import Router from './router/index';
// 或者引入Element Plus
import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/index.css' // 引入Element Plus的样式
const app = createApp(App)
app.config.productionTip = false
// components
for (const i in components) {
  app.component(i, components[i])
}

// icon
for (const i in AntIcon) {
  const whiteList = ['createFromIconfontCN', 'getTwoToneColor', 'setTwoToneColor', 'default']
  if (!whiteList.includes(i)) {
    app.component(i, AntIcon[i])
  }
}
app.use(ElementPlus)
app.use(Antd).use(Router).mount('#app')

// if (navigator.onLine) {
//   location.href = 'http://49.232.158.183/'
// } else {
//   // location.href = 'http://127.0.0.1/8080'
//   app.use(Antd).use(Router).mount('#app')
// }




